/**
 * Created by Administrator on 2015/12/8.
 */
//月度获取
    var month=['1','2','3','4','5','6','7','8','9','10','11','12'];
    var oDiv=document.getElementById('best-title');
    var pTag=document.createElement('p');
    pTag.innerHTML="2015:";
    oDiv.appendChild(pTag);
    var dd=new Date();
    var nM=dd.getMonth()+1;
    function getMonStr(){
        var url=window.location.href;
        var aUrl=url.split('/');
        var time=aUrl[aUrl.length-1];
        var monStr=parseInt(time.slice(4,6));
        return monStr;
    }

    var monStr=getMonStr();

    for(var i=0;i<month.length;i++){
        var aTag=document.createElement('a');
        aTag.innerHTML=month[i]+'月';
        if(month[i]<10){//给小于10的数前面加0
            month[i]='0'+month[i];
        }
        if(monStr==i+1){
            aTag.setAttribute("id","active");
        }
        aTag.href="/menu/monthlyMenus/"+parseInt(pTag.innerHTML)+month[i];
        oDiv.appendChild(aTag);
    }
